import request from '@/utils/request'

export default {
  /* 获取商品列表 */
  goodsList: function({goodsName, sortDirection, sortKeyword, pageNo, pageSize}){
    return request({
      method: 'GET',
      url: '/goods/goodsListFromSolr',
      params: {
        goodsName: goodsName,
        sortDirection: sortDirection,
        sortKeyword: sortKeyword,
        pageNo: pageNo,
        pageSize: pageSize
      }
    })
  },
  /* 获取商品详情 */
  goodsInfo: function(goodsId){
    return request({
      method: 'GET',
      url: '/goods/goodsInfo/'+goodsId,
    })
  },
  /* 获取商品分类列表 */
  goodsTypeList: function(pid){
    return request({
      method: 'GET',
      url: '/goods/goodsTypeList/'+pid,
    })
  }
}
